package com.example.questionnaire.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.common.utils.PageUtils;
import com.example.questionnaire.dto.AnswererAddDto;
import com.example.questionnaire.entity.AnswererEntity;
import com.example.questionnaire.entity.QuestionnaireEntity;
import com.example.questionnaire.entity.ResultEntity;

import java.util.List;
import java.util.Map;

/**
 * @author hsz
 * @email 1416446590@qq.com
 * @date 2022-10-29 11:20:57
 */
public interface AnswererService extends IService<AnswererEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void removeAnswererInUser(Integer[] answererIds, int userId);

    void saveAnswerersInUser(List<AnswererEntity> asList, int userId);

    AnswererEntity login(AnswererEntity answererEntity);

    List<ResultEntity> queryResultList(Map<String, Object> params);

    //    PageUtils queryAnswererPage(Map<String,Object>params);
    AnswererEntity findByAnswerername(String username);

    AnswererEntity findByAnswererId(int id);

    void modifyAnswererInfo(AnswererEntity answererEntity);

    void delAnswerer(int id);

    List<ResultEntity> analysis(Integer questionnaireId);

    AnswererEntity findByTelephone(String telephone);

    int reg(AnswererEntity answererEntity);

    public void removeAnswererInTeam(Integer[] answererIds,Integer teamId);

    PageUtils notRelation(Map<String, Object> params);

    void associate(Map<String, Object> params);

    void removeAssociation(Map<String, Object> params);

    int addAnswererInfo(AnswererAddDto answererAddDto);

    AnswererEntity queryAnswererByDto(AnswererAddDto answererAddDto);

    PageUtils teamanswerers( Map<String, Object> params);

    List<Integer> findQuestionnaireIdByAnswererId(Integer answererId);

    List<QuestionnaireEntity> findQuestionnaireByKeyWord(List<Integer> questionnaireIdList, String keyword);

    void addAnswererTeamInfo(AnswererAddDto answererAddDto);

    AnswererEntity login(String username,String password);
}

